import React, { Component } from 'react'
import Son from './Son'
import Son2 from './Son2'

export default class Father extends Component {
    state = {
        num: 100
    }
    render() {
        const { num } = this.state
        return (
            <div>
                <h2>我是父组件 -- { num }</h2>
                <button onClick={() => {
                    this.setState({
                        num: this.state.num + 1
                    })
                }}>佳佳</button>
                {/* <Son/> */}
                <Son2 num = { num }/>
            </div>
        )
    }
}
